import { getChannelList } from "@/store/actions/article"
import { useEffect } from "react"
import { useDispatch, useSelector } from "react-redux"

export function useChannels() {
  const channels = useSelector((state) => state.actricle.channels)
  const disPatch = useDispatch()
  useEffect(() => {
    disPatch(getChannelList())
  }, [disPatch])
  return channels
}
